package edu.sjsu.cs.GUI;


import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class SecurityViewer
{
   public static void main(String[] args)
   {
      final int FRAME_HEIGHT = 200;
      final int FRAME_WIDTH = 600;
      
      
      JFrame frame = new JFrame();
      
      frame.setTitle("Security");
      frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);
      frame.setResizable(false);
      
      frame.setLocationRelativeTo(null);
      
      JPanel panel = new JPanel();
    
      
      JLabel label1 = new JLabel("Enter a message: ");
      panel.add(label1);
      
      JTextField text1 = new JTextField(" ",10);
      panel.add(text1);
      
      JLabel label2 = new JLabel("Enter a key: ");
      panel.add(label2);
      
      JTextField keytext = new JTextField("0",5);
      panel.add(keytext);
      
      JLabel label3 = new JLabel("Encoded/Decoded Message: ");
      panel.add(label3);
      JLabel message = new JLabel("");
      panel.add(message);
      
      EncodeShuffleCipherButton encodeShuffleButton = new EncodeShuffleCipherButton(text1,keytext);
      encodeShuffleButton.addLabel(message);
      panel.add(encodeShuffleButton);
      
      DecodeShuffleCipherButton decodeShuffleButton = new DecodeShuffleCipherButton(text1,keytext);
      decodeShuffleButton.addLabel(message);
      panel.add(decodeShuffleButton);
      
      EncodeSubstitutionCipherButton encodeSubstitutionCipherButton = new EncodeSubstitutionCipherButton(text1,keytext);
      encodeSubstitutionCipherButton.addLabel(message);
      panel.add(encodeSubstitutionCipherButton);
      
      DecodeSubstitutionCipherButton decodeSubstitutionCipherButton = new DecodeSubstitutionCipherButton(text1,keytext);
      decodeSubstitutionCipherButton.addLabel(message);
      panel.add(decodeSubstitutionCipherButton);
      
      

      frame.add(panel);
      
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
     

   }

}
